package com.ant.backstage.controller.common;


import com.ant.backstage.facade.ApiReturn;
import com.ant.backstage.service.EnumService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/enum/")
@Api(value = "枚举", tags = "系统枚举")
public class EnumController {

    @Resource
    EnumService enumService;

    @ApiOperation(value = "获取系统枚举值", response = ApiReturn.class)
    @RequestMapping(value = "/getEnum", method = RequestMethod.GET)
    public ApiReturn getEnumList(@RequestParam String name) {
        ApiReturn apiReturn= enumService.getEnumList(name);
        return apiReturn;
    }
}